package com.vhall.component.entity.account;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * @author dongsong
 */
@Data
@TableName("role")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "RoleEntity对象", description = "角色表")
public class RoleEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "role_id", type = IdType.AUTO)
    @JsonProperty("role_id")
    private Integer roleId;

    @ApiModelProperty(value = "角色名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "角色标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "描述")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty(value = "状态 0：正常 1：无效")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "应用id")
    @TableField("app_id")
    @JsonProperty("app_id")
    private String appId;

    @ApiModelProperty(value = "角色级别")
    @TableField("level")
    private Integer level;

    @TableField("created_at")
    @ApiModelProperty(value = "创建时间")
    @JsonProperty("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    @ApiModelProperty(value = "更新时间")
    @JsonProperty("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除时间")
    @TableField("deleted_at")
    @JsonProperty("deleted_at")
    private LocalDateTime deletedAt;
    /**
     * 角色类型
     * 1:平台级,2:部门级
     */
    @TableField("type")
    @ApiModelProperty(value = "类型 1:平台级,2:部门级")
    private Integer type;
    /**
     * 创建人 id
     */
    @TableField("account_id")
    @ApiModelProperty(value = "创建人 id")
    private Integer accountId;
    /**
     * 创建人昵称
     */
    @TableField("account_name")
    private String accountName;

}
